package groupManagement;

import java.util.TimerTask;

import chat.LingvoChat;

public class AliveSender extends TimerTask{
	private String userName;
	private String topicName;
	private String lang;
	
	public AliveSender(String group,String userName,String lang) {
		this.topicName = group+"-control";
		this.userName=userName;
		this.lang=lang;
	}
	
	@Override
	public void run() {
		//the I'm alive message is alive-<language>-<user name>
		LingvoChat.publishMsg(topicName,"alive-"+lang+ "-" + userName);
	}
}
